package com.example.java_blog.service;

import com.example.java_blog.mapper.BlogInfoMapper;
import com.example.java_blog.model.BlogInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 均先生
 * Date: 2024-03-10
 * Time: 19:40
 */
@Service
public class BlogService {
    @Autowired
    private BlogInfoMapper blogInfoMapper;
    public List<BlogInfo> getBlogList() {
        return blogInfoMapper.selectAllBlog();
    }
    public BlogInfo queryBlogDetail(Integer blogId) {
        return blogInfoMapper.selectById(blogId);
    }
}
